#!/bin/bash
old_ip=$(cat old.log)
new_ip=$(curl -s http://ip.cip.cc)
echo oldip:$old_ip
echo newip:$new_ip
if [ "$old_ip" != "$new_ip" ];then
    python /opt/python/safe/shsafe.py
    python /opt/python/safe/gzsafe.py
    curl -s http://ip.cip.cc > old.log
else
     exit 0
fi 　